package com.lill.workflow.service;

import com.lill.workflow.model.WorkflowCurrentModel;
import com.lill.workflow.model.WorkflowStepHistoryModel;

import java.util.List;
import java.util.Map;

/**
 * Service接口
 *
 * @author lill
 * @date 2019-05-26 12:05:20
 */
public interface IWorkflowCurrentService {

    /**
     * 根据主键查询实体
     *
     * @param id 主键
     * @return 实体
     */
	WorkflowCurrentModel queryObject(String id);

    /**
     *
     * @param params
     * @return
     */
    WorkflowCurrentModel queryCurrent(Map<String, Object> params);

    /**
     * 分页查询
     *
     * @param map 参数
     * @return list
     */
    List<WorkflowCurrentModel> queryList(Map<String, Object> map);

    /**
     * 分页统计总数
     *
     * @param map 参数
     * @return 总数
     */
    int queryTotal(Map<String, Object> map);

    /**
     * 保存实体
     *
     * @param workflowCurrent 实体
     * @return 保存条数
     */
    int save(WorkflowCurrentModel workflowCurrent);
    
    /**
     * 保存实体 带着发起人
     * @param workflowCurrent
     * @param Originator 发起人
     * @return
     */
    WorkflowCurrentModel saveWithOriginator(WorkflowCurrentModel workflowCurrent,String Originator);
    
    WorkflowCurrentModel saveBean(WorkflowCurrentModel workflowCurrent);

    /**
     * 根据编号查询流程信息
     * @param businessId
     * @return
     */
    WorkflowCurrentModel queryBusiness(String businessId);

    /**
     * 根据主键更新实体
     *
     * @param workflowCurrent 实体
     * @return 更新条数
     */
    int update(WorkflowCurrentModel workflowCurrent);


    int undo(WorkflowCurrentModel workflowCurrent);
    List<WorkflowStepHistoryModel> queryObjectOne(Map<String, Object> hashMap);
    WorkflowCurrentModel listQuite (Map<String, Object> hashMap);
    WorkflowCurrentModel listFormal (Map<String, Object> hashMap);
    List<WorkflowStepHistoryModel> queryNextOne(Map<String, Object> hashMap);
    List<WorkflowStepHistoryModel> queryNextOneFormal(Map<String, Object> hashMap);
    List<WorkflowStepHistoryModel> queryObjectOneFormal(Map<String, Object> hashMap);
    List<WorkflowStepHistoryModel> queryNextOneRenew(Map<String, Object> hashMap);
    WorkflowCurrentModel listRenew (Map<String, Object> hashMap);


    int queryCopyTotal(Map<String, Object> queryData);
}
